<!--
  -    Copyright (c) 2018-2025, hycloud All rights reserved.
  -
  - Redistribution and use in source and binary forms, with or without
  - modification, are permitted provided that the following conditions are met:
  -
  - Redistributions of source code must retain the above copyright notice,
  - this list of conditions and the following disclaimer.
  - Redistributions in binary form must reproduce the above copyright
  - notice, this list of conditions and the following disclaimer in the
  - documentation and/or other materials provided with the distribution.
  - Neither the name of the pig4cloud.com developer nor the names of its
  - contributors may be used to endorse or promote products derived from
  - this software without specific prior written permission.
  - Author: hycloud
  -->

  <template>
  <div class="app-container calendar-list-container">
    <basic-container>
      <avue-crud
        ref="crud"
        :option="tableOption"
        :data="list"
        :permission="permissionList"
        :page.sync="page"
        v-model="form"
      >
      </avue-crud>
    </basic-container>
    <el-dialog
      :visible.sync="modal"
      v-if="modal"
      title=""
      width="1200px"
      top="0"
      class="flow-dialog"
      :close-on-click-modal="false"
      append-to-body
    >
      <div class="form-designer">
        <render-form
          :option="option"
          :formObj="formObj"
          @getModal="getModal"
        ></render-form>
      </div>
    </el-dialog>
  </div>
</template>
  
  <script>
import RenderForm from "@/components/table-design/newRender";
import ViewForm from "@/components/table-design/viewRender";
import addView from "@/mixins/addView";
import { mapGetters } from "vuex";

export default {
  components: { RenderForm, ViewForm },
  mixins: [addView],
  name: "special_equipment",
  data() {
    return {
      searchForm: {},
      tableOption: {
        border: true,
        index: true,
        indexLabel: "序号",
        stripe: true,
        menuAlign: "center",
        align: "center",
        dialogClickModal: false,
        searchMenuSpan: 6,
        column: [
          {
            type: "input",
            label: "设备",
            prop: "equipment",
            width: 300,
          },
          {
            type: "input",
            label: "短路",
            prop: "shortCircuit",
            width: 150,
          },
          {
            type: "input",
            label: "过压",
            prop: "overvoltage",
            width: 150,
          },
          {
            type: "input",
            label: "欠压",
            prop: "undervoltage",
            width: 150,
          },
          {
            type: "input",
            label: "缺相",
            prop: "phasedeficiency",
            width: 150
          },
          {
            type: "input",
            label: "错相",
            prop: "phaseStagger",
            width: 150
          },
          {
            type: "input",
            label: "过载",
            prop: "overload",
            width: 150
          }
        ],
      },

      formObj: {
        code: "special_equipment",
        title: "",
        attachment: "",
        flag: "start",
        bizData: {},
      },
      dataobj: {},
      option: {},
      option1: {},
      modal: false,
      modal1: false,
      page: {
        total: 0, // 总页数
        currentPage: 1, // 当前页数
        pageSize: 20, // 每页显示多少条
      },
      tableLoading: false,
      list: [
        {
          equipment: "002",
          shortCircuit: "正常",
          overvoltage: "正常",
          contactInformation: "正常",
          undervoltage: "正常",
          phasedeficiency: "正常",
          phaseStagger: "正常",
          overload: "正常"
        },
        {
          equipment: "003",
          shortCircuit: "短路",
          overvoltage: "正常",
          contactInformation: "正常",
          undervoltage: "正常",
          phasedeficiency: "正常",
          phaseStagger: "正常",
          overload: "过流"
        },
      ],
    };
  },
  computed: {
    ...mapGetters(["permissions", "tagList"]),
    permissionList() {
      return {
        addBtn: false,
        delBtn: false,
        editBtn: false,
      };
    },
  },
  created() {},

  methods: {},
};
</script>